package com.zmytest.annotation.bean;

import lombok.Data;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * Created on 2018/12/29.
 *
 * @author zhangmingyu
 */
public class BeanTest {

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @PostConstruct
    public void init(){
        System.out.println("init method， after BeanTest constructor");
    }
    @PostConstruct
    public void init2(){
        System.out.println("init method2， after BeanTest constructor");
    }

    @PreDestroy
    public void preDestroy(){
        System.out.println("destroy method, before BeanTest destroy");
    }

    @PreDestroy
    public void preDestroy2(){
        System.out.println("destroy method2, before BeanTest destroy");
    }
}
